<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/5
  Time: 13:41
  To change this template use File | Settings | File Templates.
--%>
<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/4
  Time: 14:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="mybatis.pojo.Grade" %>
<%@ page import="mybatis.pojo.Subject" %>
<%@ page import="mybatis.services.GradeServerices" %>
<%@ page import="mybatis.services.SubjectServerices" %>
<%@ page import="java.util.List" %>
<%@ page import="mybatis.services.StudentService" %>
<%@ page import="mybatis.pojo.Student" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ page import="sun.security.ssl.Record" %>
<script src="js/jquery.js"></script>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>超市账单管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<%@include file="checkLogin.jsp"%>
<!--主体内容-->
<%
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    int allRecord=0;
    //int totalRecord=0;
    int totalPage=1;
    int pageInex=1;
    List<Student>students=null;

%>
<section class="publicMian ">

    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>学生管理</span>
        </div>
        <div class="search">
            <form action="findSubject.jsp" method="post">
                <span>学生名称：</span>
                <input type="text" placeholder="请输入学生的名称" value="" name="subName"/>
                <input type="submit" value="查询"/>
            </form>
            <a href="studentAdd.jsp">添加</a>
        </div>

        <!--供应商操作表格-->
        <table class="providerTable" cellpadding="0" cellspacing="0">
            <tr class="firstTr">
                <th width="10%">编号</th>
                <th width="10%">姓名</th>
                <th width="10%">性别</th>
                <th width="10%">电话</th>
                <th width="10%">qq</th>
                <th width="10%">微信</th>
                <th width="10%">年级</th>
                <th width="10%">入学时间</th>
                <th width="10%">来自城市</th>
                <th width="10%">出生日期</th>
                <th width="10%">家庭住址</th>
                <th width="10%">密码</th>
                <th width="10%">身份证号</th>
            </tr>
            <%
                List<Student> student = StudentService.ME.findAllLimit(1, 10);

                for (Student stu : student) {


            %>
            <tr>
                <td><%=stu.getStuno()%>
                </td>
                <td><%=stu.getSname()%>
                </td>
                <td><%=stu.getSex()%>
                </td>
                <td><%=stu.getTelephone()%>
                </td>
                <td><%=stu.getQq()%>
                </td>
                <td><%=stu.getWechat()%>
                </td>
                <td><%= GradeServerices.ME.find(stu.getGradeid()).getGname()%>
                </td>
                <td><%=stu.getEnterdate()==null?"无日期信息":format.format(stu.getEnterdate())%>
                </td>
                <td><%=stu.getFromcity()%>
                </td>
                <td><%=stu.getBirthday()==null? "无日期信息":format.format(stu.getBirthday())%>
                </td>
                <td><%=stu.getAddress()%>
                </td>
                <td><%=stu.getPass()%>
                </td>
                <td><%=stu.getIdcardpic()%>
                </td>

                <td>
                    <a href="providerView.html"><img src="img/read.png" alt="查看" title="查看"/></a>
                    <a href="studentUpdate.jsp?stId=<%=stu.getStuno()%>"><img src="img/xiugai.png" alt="修改" title="修改"/></a>
                    <a href="subjectDelete.jsp?id=<%=stu.getStuno()%> " class="removeProvider"
                       onclick="return confirm('确认是否删除')"><img src="img/schu.png" alt="删除" title="删除"/></a>
                </td>
            </tr>
            <%}%>
        </table>

    </div>
</section>

<!--点击删除按钮后弹出的页面-->
<div class="zhezhao"></div>
<div class="remove" id="removeProv">
    <div class="removerChid">
        <h2>提示</h2>
        <div class="removeMain">
            <p>你确定要删除该供应商吗？</p>
            <a href="#" id="yes">确定</a>
            <a href="#" id="no">取消</a>
        </div>
    </div>
</div>
<tr class="alt">
    <td class="center" colspan="3">
        共<%=totalRecord%>条记录&nbsp;

    </td>
</tr>

</body>
</html>
